import requests


def finger(url, filename, version="1.0"):
    f = open(filename, 'rb')
    b = f.read()
    f.close()
    res = requests.post(f'http://{url}/wfpredict/finger/{version}', data={'data': b})
    return res.json()


if __name__ == '__main__':
    results = finger('192.168.0.202:8080', filename='/Users/zmh/Desktop/8401652767129_.pic.jpg')
    print(results)
